
function(ParseConfiguration DotConfigFile)
	if (NOT EXISTS ${DotConfigFile})
		message(FATAL_ERROR
		"${DotConfigFile} not exist,
			please source build/envsetup_soc.sh and defconfig relative board_defconfig")
	endif()
	file(READ "${DotConfigFile}" DotConfig)
	string(REPLACE "\\\n" "" DotConfig ${DotConfig})
	string(REPLACE "\n" ";" DotConfLines ${DotConfig})
	list(REMOVE_ITEM DotConfLines "")
	foreach(configline ${DotConfLines})
		string(REPLACE "=" ";" line_split ${configline})
		list(LENGTH line_split count)
		if (count LESS 2)
			continue()
		endif()
		list(GET line_split -1 value)
		string(STRIP ${value} value)
		separate_arguments(value)
		list(REMOVE_AT line_split -1)
		foreach(conf_name ${line_split})
			set(${conf_name} ${value} PARENT_SCOPE)
			message("${conf_name}=${value}")
#			add_definitions(-D${conf_name}=${value} )
		endforeach()
	endforeach()
endfunction()

